import { NavLink, Route } from "react-router-dom"
const CustomLink = props => {
    // console.log(props)
    let { to, children,query="" } = props
    return (
        <Route path={to} children={({ match }) => {
            // console.log(match)
            let el = match ? "🚀" + children : children
            return (
                <NavLink to={to+query}>{el}</NavLink>
            )
        }}></Route>
    )
}
export default CustomLink